package list.simple;

import list.ListNode;

/**
 * 分割数组的最大值
 * 示例 1：
 *
 * 输入：head = [4,5,1,9], node = 5
 * 输出：[4,1,9]
 * 示例 2：
 *
 * 输入：head = [4,5,1,9], node = 1
 * 输出：[4,5,9]
 * 链接：https://leetcode-cn.com/problems/delete-node-in-a-linked-list
 */
public class DeleteNodeInALinkedList_237 {

    public void deleteNode(ListNode node) {
        node.val = node.next.val;
        node.next = node.next.next;
    }
}
